<?php

namespace common\models\ar;

use Yii;

/**
 * This is the model class for table "exchange_rate".
 *
 * @property string $currency 币种
 * @property string $exchange_rate 币种汇率
 */
class ExchangeRate extends \yii\db\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 'exchange_rate';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['currency'], 'required'],
            [['exchange_rate'], 'number'],
            [['currency'], 'string', 'max' => 45],
            [['currency'], 'unique'],
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'currency' => 'Currency',
            'exchange_rate' => 'Exchange Rate',
        ];
    }
}
